import QtQuick 2.0
import ImageItem 1.0

Item{
    property alias imuBoardVisible: imuBoard.visible
        property alias compassVisible: myCompass.visible
    anchors.fill: parent
    //报警指示灯
    WarnLight{
        id: warnLight
        anchors.bottom: parent.bottom
    }

//    //基础信息指示
//    BaseData{
//        id: baseData
//        carName: "平地机 001"
//        controlMode: can_manager.remote_state ? "Remote mode" : "Local mode"
//        Connections{
//            target: can_manager
//            function onUpdateBandWidthSignal(bandwidth){
//                baseData.bandwidth = bandwidth.toFixed(0)
//            }
//        }
//    }

    // 指南针
    Compass{
        id: myCompass
        anchors.top: parent.top
        anchors.topMargin: 115
        anchors.right: parent.left
        anchors.rightMargin: 450
        currentAngle: -(can_manager.gps_direction * 2)
    }

    // 倾角指示
    Imuboard{
        id: imuBoard
        anchors.top: myCompass.bottom
        anchors.topMargin: 15
        anchors.right: parent.left
        anchors.rightMargin: 450
    }

    // 环视图像
    Rectangle{
        id: overlookImage
        width: 435
        height: 755
        anchors.right: parent.right
        anchors.rightMargin: 1080
        color: "#00000000"
        border.color: "#00FFFF"
        border.width: 4
        radius: 3
        ImageItem{
            id: overLookImage
            width: 430
            height: 750
            anchors.centerIn: parent
            revolve: true
            Connections{
                target: image_manager
                function onSignalOverLookImage(show_state, image){
                    overLookImage.paintTwoOneTwoImage(show_state, image)
                }
            }
        }

        Image {
            anchors.centerIn: parent
            source: "qrc:/grader/imgs/safe_range.png"
        }
    }

}

